<template>
  <div></div>
</template>

<script>
  import Confirm from '@/vmui/dialog/src/confirm'
  export default {
    methods: {
      test1 () {
        Confirm.new({title: '选填标题', message: '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈', callback: () => { console.log('closed') }}, function () {
          console.log('click ok')
        }, function () {
          console.log('click cancel')
        })
      },
      test2 () {
        Confirm.new({
          title: '选填标题',
          message: '哈哈',
          buttons: [{
            text: '取消',
            click: function () {
              console.log('cancel click')
            }
          }, {
            text: '让我想想',
            color: '#f00',
            disabled: true,
            click: function () {
              console.log('think a moment')
            }
          }, {
            text: '确定',
            color: true,
            click: function () {
              console.log('ok Click')
            }
          }]
        })
      }
    },
    mounted () {
      this.test1()
      this.test2()
    }
  }
</script>

